{extend name='base' }
{block name='content'}
<div class="lunbo">
    <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators">
            <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
            <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
            <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
        </ol>
        <div class="carousel-inner">
            <div class="carousel-item active">
                <img src="__STATIC__/index/images/banner1.png" class="d-block w-100" alt="...">
            </div>
            <div class="carousel-item">
                <img src="__STATIC__/index/images/banner2.png" class="d-block w-100" alt="...">
            </div>
            <div class="carousel-item">
                <img src="__STATIC__/index/images/banner3.png" class="d-block w-100" alt="...">
            </div>
        </div>
        <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        </a>
        <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
        </a>
    </div>
</div>
<div class="project">
    <div class="p-title">
        <span>等级课程</span>
        <div class="p-more">
            <i class="iconfont">&#xe628;</i>
            <a href="{:url('index/project/index')}">更多</a>
        </div>
    </div>
    <div class="p-content">
        {foreach $proList as $v}
        <div class="p-list">
            <a href="{:url('index/video/index',['pro_id'=>$v.pro_id])}">
                <img src="{$v.pro_thumb}" alt="">
                <p>《{$v.pro_name}》</p>
            </a>
        </div>
        {/foreach}
    </div>
</div>
<div class="project">
    <div class="p-title">
        <span>图书商城</span>
        <div class="p-more">
            <i class="iconfont">&#xe628;</i>
            <a href="{:url('index/book/index')}">更多</a>
        </div>
    </div>
    <div class="p-book">
        {foreach $bookList as $v}
        <div class="p-list">
            <a href="{:url('index/book/buy',['book_id'=>$v.book_id])}">
                <img src="{$v.book_thumb}" alt="">
                <p>《{$v.book_name}》</p>
            </a>
        </div>
        {/foreach}

    </div>
</div>
<div class="project">
    <div class="p-title">
        <span>短视频专区</span>
        <div class="p-more">
            <i class="iconfont">&#xe628;</i>
            <a href="{:url('index/othvideo/index')}">更多</a>
        </div>
    </div>
    <div class="p-video">
        {foreach $othvideoList as $v}
        <div class="p-list">
            <a href="{:url('index/othvideo/play',['id'=>$v.othvideo_id])}">
                <img src="{$v.othvideo_thumb}" alt="">
                <p>{$v.othvideo_name}</p>
            </a>
        </div>
        {/foreach}
    </div>
</div>
<div class="article">
    <div class="files">
        <div class="files-tit">
            <span>政治文件</span>
            <div class="p-more">
                <i class="iconfont">&#xe628;</i>
                <a href="{:url('index/article/index')}">更多</a>
            </div>
        </div>
        <div class="file-content">
            <ul>
                {foreach $zzFile as $v}
                <li><i class="iconfont">&#xe606;</i><a href="{:url('index/article/read',['art_id'=>$v.art_id])}">{$v.art_name}</a></li>
                {/foreach}
            </ul>
        </div>
    </div>
    <div class="files" style="float: right">
        <div class="files-tit">
            <span>政治文件</span>
            <div class="p-more">
                <i class="iconfont">&#xe628;</i>
                <a href="{:url('index/article/index')}">更多</a>
            </div>
        </div>
        <div class="file-content">
            <ul>
                {foreach $examFile as $v}
                <li><i class="iconfont">&#xe606;</i><a href="{:url('index/article/read',['art_id'=>$v.art_id])}">{$v.art_name}</a></li>
                {/foreach}
            </ul>
        </div>
    </div>
</div>
<script>
    layui.use('layer', function(){
        var layer = layui.layer;
    });
    $('#sub').click(function () {
        var phone=$("input[name='user_name']").val();
        var pwd=$("input[name='user_password']").val();
        if(phone=="" || pwd==""){
            layer.msg("请填写手机号和密码",{icon:2});
        }else {
            $.post("{:url('index/login/login')}",{user_name:phone,user_password:pwd},function (res) {
                if(res.code){
                    layer.msg("登陆成功",{icon:1});
                    setTimeout(function () {
                        window.location.href="{:url('index/index/index')}"
                    },500)
                }else {
                    layer.msg(res.msg,{icon:2});
                }
            })
        }
    })
</script>
{/block}
{/extend}
